package spring.pojo;

import org.springframework.stereotype.Component;

@Component
public class Emp {
    String name="jack";
    /**绑定两个类的关系*/
    private Dept dept;

    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }

    @Override
    public String toString() {
        return "Emp{" +
                "name='" + name + '\'' +
                ", dept=" + dept +
                '}';
    }
}
